import { deleteContact } from "../contact";
import { redirect } from "react-router-dom";

// export async function action({ params }) {
//   await deleteContact(params.contactId);
//   return redirect("/");
// }

export async function action({ params }) {
  // throw new Error("oh dang!");
  await deleteContact(params.contactId);
  return redirect("/");
}
